forum

Home / DeveloperSection / Forums / How to Bind Databse value to TexBox in wpf MVVM Entity FrameWork

How to Bind Databse value to TexBox in wpf MVVM Entity FrameWork

kavya bathineni 1812 23-Nov-2016
my xaml file is 
<Label Name="lblCNReports" Content="1.  Company-Name-Reports" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="22" Canvas.Top="67"  Width="158"/>
            <TextBox Name="txtCNReports" MaxLength="100" Width="190" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="185" Canvas.Top="67" TabIndex="1"  MinHeight="15">
                <i:Interaction.Behaviors>
                    <vmHelper:KeyUpWithArgsBehavior KeyUpCommand="{Binding KeyUPCommand}" ></vmHelper:KeyUpWithArgsBehavior>
                </i:Interaction.Behaviors>
            </TextBox>
            <Label Name="lblCNDisplay" Content="2.  Company-Name-Display" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="22" Canvas.Top="94" />
            <TextBox Name="txtCNDisplay"MaxLength="200" Width="190" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="185" Canvas.Top="94" TabIndex="2"   MinHeight="15">
                <i:Interaction.Behaviors>
                    <vmHelper:KeyUpWithArgsBehavior KeyUpCommand="{Binding KeyUPCommand}" ></vmHelper:KeyUpWithArgsBehavior>
                </i:Interaction.Behaviors>
            </TextBox>
            <Label Name="lblAddress1" Content="3.  Address-1" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="22" Canvas.Top="121"/>
            <TextBox Name="txtAddress1"  MaxLength="150" Width="170" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="185" Canvas.Top="121"  TabIndex="3"  MinHeight="15" >
                <i:Interaction.Behaviors>
                    <vmHelper:KeyUpWithArgsBehavior KeyUpCommand="{Binding KeyUPCommand}" ></vmHelper:KeyUpWithArgsBehavior>
                </i:Interaction.Behaviors>
            </TextBox>
         i want to add database value to textbox.how it is possible

c# wpf 
Updated on 23-Nov-2016

Can you answer this question?


Answer

0 Answers

Liked By